package com.sun.job;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class EmailJob {

    @XxlJob(value = "errorEmailJob")
    public void testErrorEmailJob(){
        XxlJobHelper.log("XXL-JOB,userJobHandler start.....");
        log.info("当前执行的JobId:[" + XxlJobHelper.getJobId() + "]");
         int a = 10 / 0;
         log.info("输出结果为:",a);
        XxlJobHelper.log("XXL-JOB,userJobHandler end.....");

    }
}
